const fs = require('fs');

let cb = (err, data) => {
    console.log(data);
};

fs.readFile('./index.html', cb);

----------------------------------------------
let p = new Promise((resolve, reject) => {
    fs.readFile('./index.html', (err, data) => {
        if(err) reject(err);
        resolve(data);
    })
});

let cb = function (value){
    console.log(value);
}

p.then(cb);

p.then(function(v){
    
})